unit oFrameObjectInspector;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, StdCtrls, ExtCtrls, oLogicalEntity;

type
  TframeObjectInspector = class(TFrame)
    lblType: TLabel;
    pnlTourniquet: TGroupBox;
    txtGenerator: TLabeledEdit;
    procedure txtGeneratorClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    Entity: TLogicalEntity;
    procedure showTourniquet;
  end;

implementation

uses
  oMasterManager, oTurniquet, oProcessItem, oProcessObjectConstants, oProcessObjects;

{$R *.dfm}

{ TframeObjectInspector }

procedure TframeObjectInspector.showTourniquet;
begin
  pnlTourniquet.Visible := true;
  //other pannels unvisible
end;

procedure TframeObjectInspector.txtGeneratorClick(Sender: TObject);
var
  item: TProcessItem;
begin
  with Entity as TTurniquet do
    begin
      item := TProcessItem.create(PO_GET_GENERATOR,TProcessingGeneratorData.create(GeneratorData));
      item := tMasterManager.EntityProcessObject(item);
      GeneratorData := (item.Data as TProcessingGeneratorData).Data;
      txtGenerator.Text := GeneratorData.toString;
      item.Free;
    end;
end;

end.
